package week4;

public class Sphere {
    private double zhi = 0;

    public Sphere(double zhijing){
        zhi = zhijing;
    }

    public void setZhijing(double jing){
        zhi = jing;
    }

    public double getTiji(){
        double tiji;
        double ban = zhi/2;
        tiji = Math.pow(ban,3) * (4/3) * Math.PI;
        return tiji;
    }

    @Override
    public String toString() {
        return "zhijing: " + zhi + "   tiji: " + Math.pow(zhi/2,3) * (4/3) * Math.PI;
    }
}
